package com.zs.blog.model.vo;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;
import java.util.List;

/**
 * @Title: ArticleEditVO
 * @Author zs
 * @Package com.zs.blog.model.vo
 * @Date 2025/3/4 21:54
 * @description: 用于后台文章编辑的数据模型
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class ArticleEditVO {

    @Schema(description = "文章ID")
    private Long id;

    @Schema(description = "作者ID")
    private Integer userId;

    @Schema(description = "文章标题")
    private String articleTitle;

    @Schema(description = "文章描述")
    private String articleDescription;

    @Schema(description = "文章缩略图")
    private String articleThumb;

    @Schema(description = "文章内容")
    private String articleContent;

    @Schema(description = "原文链接")
    private String originalUrl;

    @Schema(description = "浏览量")
    private Long viewCount;

    @Schema(description = "是否置顶[0:否,1:是]")
    private Integer isTop;

    @Schema(description = "文章类型 [0:原创，1:转载，2:翻译 ]")
    private Integer articleType;

    @Schema(description = "文章状态 [0:公开，1:私密，2:草稿 ]")
    private Integer articleState;

    @Schema(description = "创建时间")
    @JsonFormat(timezone = "GMT+8", locale = "zh", pattern = "yyyy-MM-dd hh:mm:ss", shape = JsonFormat.Shape.STRING)
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @Schema(description = "更新时间")
    @JsonFormat(timezone = "GMT+8", locale = "zh", pattern = "yyyy-MM-dd hh:mm:ss", shape = JsonFormat.Shape.STRING)
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;

    @TableField(exist = false)
    @Schema(description = "文章分类")
    private String categoryName;

    @TableField(exist = false)
    @Schema(description = "文章标签")
    private List<Long> tags;
}
